<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<link href="<c:url value="css/app.css" />" rel="stylesheet" type="text/css">
<title>基于Spring Security的权限管理应用</title>
</head>
<body class="security-app">
    <div class="details">
        <h2>基于Spring Security的权限管理应用</h2>
    </div>
    <form action="/login" method="post">
        <div class="lc-block">
            <div>
                <input type="text" class="style-4" name="username" placeholder="用户名" />
            </div>
            <div>
                <input type="password" class="style-4" name="password" placeholder="密码" />
            </div>
            <div>
                <input type="submit" value="登录" class="button red small" />
            </div>
            <c:if test="${param.error ne null}">
                <div class="alert-danger">用户名或者密码错误</div>
            </c:if>
            <c:if test="${param.logout ne null}">
                <div class="alert-normal">已成功退出</div>
            </c:if>
        </div>
        <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
    </form>
</body>
</html>